Subroutine calkp(temp)

	USE ckvar
	IMPLICIT NONE

	REAL :: temp
	REAL :: ts,th	! temporary variables
	INTEGER :: i,j

	do i=1,nreac
	ts=0.0_dp
	th=0.0_dp
	  do j=1,4
!	  write(*,*) spc(ispreac(i,j)),nspreac(i,j)
	  if(ispreac(i,j).ne.0.0) then
	  ts=ts+nspreac(i,j)*thp(ispreac(i,j),3)	! del(So/Ru)
	  th=th+nspreac(i,j)*thp(ispreac(i,j),2)	! del(Ho/RuT)
	  endif
	  enddo
	kp(i)=exp(ts-th)
!	if(i.eq.nreac) then
!	  do j=1,3
!	  write(*,*) spc(ispreac(i,j)),nspreac(i,j)
!	  write(*,*) thp(ispreac(i,j),3),thp(ispreac(i,j),2)
!	  enddo	
!	write(*,*) 'kp',kp(i)
!	endif
	enddo
End subroutine
